package cn.seaboot.admin.upload.utils;

import org.springframework.web.multipart.MultipartHttpServletRequest;

import javax.servlet.http.HttpServletRequest;

/**
 * 文件请求转换，方便程序进一步处理 request
 *
 * HttpServletRequest convert to MultipartHttpServletRequest. different system maybe have a little different.
 * <p>
 * E.G. If used shiro, you should convert HttpServletRequest to ShiroHttpServletRequest first，
 * then,  convert ShiroHttpServletRequest to MultipartHttpServletRequest.
 *
 * @author Mr.css
 * @version 2020-05-20 15:14
 */
public interface MultipartRequestConverter {
    /**
     * HttpServletRequest
     *
     * @param request HttpServletRequest
     * @return MultipartHttpServletRequest
     */
    MultipartHttpServletRequest convertToMultipartRequest(HttpServletRequest request);
}
